473,445 Members | 1,880 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

css submenu a href problem

oll3i
679 512MB
i have written css tab menu
but my links in submenu inherit the style of a href in main menu (#menu ul li a)?
when i hover over the links in submenu they do change as i want them to change they just display as #menu ul li a

Expand|Select|Wrap|Line Numbers
  1. #menu {
  2.     position:absolute;
  3.     height:auto;
  4.     width:930px;
  5.     top:10px;
  6.     left:10px;
  7.     }
  8.  
  9. #menu ul {
  10. float:left;
  11. margin:0;
  12. padding:0;
  13. list-style:none;
  14. }    
  15. #menu ul li{
  16. display:inline;
  17. }
  18.  
  19. #menu ul li a{
  20. width:80px;
  21. height:22px;
  22. float:left;
  23. display:block;
  24. margin:0 1px 0 0;
  25. font-size:100%;
  26. text-decoration:none;
  27. text-align:center;
  28. color:#FFF;
  29. font-weight:bold;
  30. background:url(../images/top_menu_normal.gif) left top no-repeat;
  31. padding:3px 0 0 0;}
  32.  
  33.  
  34.  
  35.  
  36. #menu ul li a:hover{
  37. width:80px;
  38. height:22px;
  39. float:left;
  40. display:block;
  41. text-align:center;
  42. margin-top:0;
  43. margin-right:1px;
  44. margin-bottom:0;
  45. margin-left:0;
  46. font-size:100%;
  47. text-decoration:none;
  48. color:#FFF;
  49. font-weight:bold;
  50. background:url(../images/top_menu_hover.gif) left top no-repeat;  
  51. padding:3px 0 0 0;
  52. }
  53. #menu ul li a:active{
  54. width:80px;
  55. height:22px;
  56. float:left;
  57. display:block;
  58. text-align:center;
  59. margin-top:0;
  60. margin-right:1px;
  61. margin-bottom:0;
  62. margin-left:0;
  63. font-size:100%;
  64. text-decoration:none;
  65. color:#FFF;
  66. font-weight:bold;
  67. background:url(../images/top_menu_hover.gif) left top no-repeat;  
  68. padding:3px 0 0 0;
  69. }
  70.  
  71. #menu ul #submenu{
  72. position:absolute;
  73. top:2px;
  74. left:0px;
  75. float:left;
  76. width:818px;
  77. height:10px;
  78. margin:0;
  79. padding:0;
  80. font-size:100%;
  81. }
  82.  
  83. #menu ul #submenu ul {    
  84. position:relative;
  85. margin:0;
  86. padding:0;
  87. bottom:-1.4em;
  88. left:0px;
  89. font-size:100%;
  90. width:818px;
  91. background:none;
  92. }
  93.  
  94.  
  95. #menu ul #submenu li{
  96. display:inline;
  97. list-style:none;
  98. border-right:1px solid #CCC;
  99. padding-right:2px;
  100. background:none;
  101. }
  102.  
  103.  
  104.  
  105.  
  106. #menu ul#submenu li a{
  107. text-decoration:none;
  108. color:#000;
  109. background:none;
  110. }
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117. #menu ul #submenu  li a:hover{
  118. text-decoration:none;
  119. color:#CCC;
  120. background:none;
  121. }
  122. #menu ul #submenu  li a:active{
  123. text-decoration:none;
  124. color:#CCC;
  125. background:none;
  126. }
  127.  
what should i change?
thank you
Jul 14 '08 #1
1 2228
oll3i
679 512MB
thank you i figured it out :)
Jul 14 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Jonathan | last post by:
Hello All, I am in the process of creating a 2/3 level collapsible/exspanible menu (called "nav") where users can click on a category and have the submenus appear beneath it and so on (allow...
2
by: az538 | last post by:
Hello All, I am having a problem with my menu and submenu system. It works like a champ in IE6 and Firefox but IE7 renders the submenus in incorrect positions on the page. Also, the menu system...
1
by: bhosalevivek | last post by:
I did this code from Dynamic Drive DHTML. it's working properly, but now I need submenu for "Submenu 1.2", means when I take mouse on "Submenu 1.2" I need to display "Submenu 1.2.1". I try to do...
5
by: remon87 | last post by:
I need some help. I have javasript that creates the submenu but it works if I have a text with css. I need it to do the same with a roll over images. so when I click on the image the submenu...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.